Welcome to Timeline - the home of world history. Every week we'll be bringing you one-off documentaries and series from the world's top broadcasters, including the BBC, Channel 4, Discovery and PBS.
DW Documentary gives you information beyond the headlines. Watch top documentaries from German broadcasters and international production companies. Meet intriguing people, travel to distant lands, get a look behind the complexities of daily life and build a deeper understanding of current affairs and global events. Subscribe and explore the world around you with DW Documentary from Deutsche Welle (DW), Germany's international broadcaster
Free Documentary is dedicated to bringing high-class documentaries to you on YouTube for free with the latest camera equipment used by well-known filmmakers working for famous production studios. You will see fascinating shots from the deep seas and up in the air, capturing great stories and pictures of everything our extraordinary planet offers.
Do you want to know more? For over 20 years Journeyman Pictures have independently distributed the world's most provocative, incisive factual TV. Working with the top players in the industry, our award-winning stories put us at the spearhead of the factual agenda. We're your independent source for the world's most powerful films, exploring the burning issues of today
"60 Minutes," the most successful television broadcast in history. Offering hard-hitting investigative reports, interviews, feature segments and profiles of people in the news, the broadcast began in 1968 and is still a hit, over 50 seasons later, regularly making Nielsen's Top 10.
Enlightening commentary, authoritative advice, and unique stories you won't find anywhere else. Our immersive and ground-breaking storytelling has changed the way people think about culture, crime, art, parties, fashion, protest, the internet and other subjects that don't even have names yet. Browse the library and discover corners of the world you never knew existed.
# lets import libraries
from googleapiclient.discovery import build
import pandas as pd
import seaborn as sn
# Function to get channel statistics
api_key = 'AIzaSyB24Kop04L1GlTgRCm1XtQ4KB2a4gaBOwA'
Timeline_channel_id = ['UC88lvyJe7aHZmcvzvubDFRg' # Timeline - World History Documentaries
]
youtube = build('youtube','v3',developerKey = api_key)
from googleapiclient.errors import HttpError
def get_channel_stats(youtube, Timeline_channel_id):
all_data = []
try:
request = youtube.channels().list(
part='snippet,contentDetails,statistics',
id=','.join(Timeline_channel_id)
)
response = request.execute()
for item in response.get('items', []):
snippet = item.get('snippet', {})
statistics = item.get('statistics', {})
data = {
'Channel_name': snippet.get('title', ''),
'Subscribers': statistics.get('subscriberCount', ''),
'Views': statistics.get('viewCount', ''),
'Total_videos': statistics.get('videoCount', '')
}
all_data.append(data)
except HttpError as e:
print(f"HTTP error occurred: {e}")
print(f"Request URL: {e.resp.request.url}")
print(f"Request body: {e.resp.request.body}")
return all_data
get_channel_stats(youtube,Timeline_channel_id)
[{'Channel_name': 'Timeline - World History Documentaries', 'Subscribers': '5120000', 'Views': '1173285359', 'Total_videos': '1235'}]
channel_statistics = get_channel_stats(youtube, Timeline_channel_id)
Timeline_channel_data =pd.DataFrame(channel_statistics)
Timeline_channel_data
Channel_name | Subscribers | Views | Total_videos | |
---|---|---|---|---|
0 | Timeline - World History Documentaries | 5120000 | 1173285359 | 1235 |
# Function to get channel statistics
api_key = 'AIzaSyB24Kop04L1GlTgRCm1XtQ4KB2a4gaBOwA'
DW_Documentary_channel_id = ['UCW39zufHfsuGgpLviKh297Q' # DW Documentary
]
youtube = build('youtube','v3',developerKey = api_key)
from googleapiclient.errors import HttpError
def get_channel_stats(youtube, DW_Documentary_channel_id):
all_data = []
try:
request = youtube.channels().list(
part='snippet,contentDetails,statistics',
id=','.join(DW_Documentary_channel_id)
)
response = request.execute()
for item in response.get('items', []):
snippet = item.get('snippet', {})
statistics = item.get('statistics', {})
data = {
'Channel_name': snippet.get('title', ''),
'Subscribers': statistics.get('subscriberCount', ''),
'Views': statistics.get('viewCount', ''),
'Total_videos': statistics.get('videoCount', '')
}
all_data.append(data)
except HttpError as e:
print(f"HTTP error occurred: {e}")
print(f"Request URL: {e.resp.request.url}")
print(f"Request body: {e.resp.request.body}")
return all_data
get_channel_stats(youtube,DW_Documentary_channel_id)
[{'Channel_name': 'DW Documentary', 'Subscribers': '5390000', 'Views': '788340346', 'Total_videos': '1071'}]
channel_statistics = get_channel_stats(youtube, DW_Documentary_channel_id)
DW_Documentary_channel_data =pd.DataFrame(channel_statistics)
DW_Documentary_channel_data
Channel_name | Subscribers | Views | Total_videos | |
---|---|---|---|---|
0 | DW Documentary | 5390000 | 788340346 | 1071 |
# Function to get channel statistics
api_key = 'AIzaSyB24Kop04L1GlTgRCm1XtQ4KB2a4gaBOwA'
Free_Documentary_channel_id = ['UCBnFes2U2diA3QfR5m8l_Tw' # JPMorgan Chase
]
youtube = build('youtube','v3',developerKey = api_key)
from googleapiclient.errors import HttpError
def get_channel_stats(youtube, Free_Documentary_channel_id):
all_data = []
try:
request = youtube.channels().list(
part='snippet,contentDetails,statistics',
id=','.join(Free_Documentary_channel_id)
)
response = request.execute()
for item in response.get('items', []):
snippet = item.get('snippet', {})
statistics = item.get('statistics', {})
data = {
'Channel_name': snippet.get('title', ''),
'Subscribers': statistics.get('subscriberCount', ''),
'Views': statistics.get('viewCount', ''),
'Total_videos': statistics.get('videoCount', '')
}
all_data.append(data)
except HttpError as e:
print(f"HTTP error occurred: {e}")
print(f"Request URL: {e.resp.request.url}")
print(f"Request body: {e.resp.request.body}")
return all_data
get_channel_stats(youtube,Free_Documentary_channel_id)
[{'Channel_name': 'jpmorgan', 'Subscribers': '102000', 'Views': '41976005', 'Total_videos': '970'}]
channel_statistics = get_channel_stats(youtube, Free_Documentary_channel_id)
Free_Documentary_channel_data =pd.DataFrame(channel_statistics)
Free_Documentary_channel_data
Channel_name | Subscribers | Views | Total_videos | |
---|---|---|---|---|
0 | jpmorgan | 102000 | 41976005 | 970 |
# Function to get channel statistics
api_key = 'AIzaSyB24Kop04L1GlTgRCm1XtQ4KB2a4gaBOwA'
Journeyman_Pictures_channel_id = ['UCM2YmsRUeIbRkqjgNm0eTGQ' # Journeyman Pictures
]
youtube = build('youtube','v3',developerKey = api_key)
from googleapiclient.errors import HttpError
def get_channel_stats(youtube, Journeyman_Pictures_channel_id):
all_data = []
try:
request = youtube.channels().list(
part='snippet,contentDetails,statistics',
id=','.join(Journeyman_Pictures_channel_id)
)
response = request.execute()
for item in response.get('items', []):
snippet = item.get('snippet', {})
statistics = item.get('statistics', {})
data = {
'Channel_name': snippet.get('title', ''),
'Subscribers': statistics.get('subscriberCount', ''),
'Views': statistics.get('viewCount', ''),
'Total_videos': statistics.get('videoCount', '')
}
all_data.append(data)
except HttpError as e:
print(f"HTTP error occurred: {e}")
print(f"Request URL: {e.resp.request.url}")
print(f"Request body: {e.resp.request.body}")
return all_data
get_channel_stats(youtube,Journeyman_Pictures_channel_id)
[{'Channel_name': 'Journeyman Pictures', 'Subscribers': '2350000', 'Views': '881489991', 'Total_videos': '8713'}]
channel_statistics = get_channel_stats(youtube, Journeyman_Pictures_channel_id)
Journeyman_Pictures_channel_data =pd.DataFrame(channel_statistics)
Journeyman_Pictures_channel_data
Channel_name | Subscribers | Views | Total_videos | |
---|---|---|---|---|
0 | Journeyman Pictures | 2350000 | 881489991 | 8713 |
# Function to get channel statistics
api_key = 'AIzaSyB24Kop04L1GlTgRCm1XtQ4KB2a4gaBOwA'
sixty_channel_id = ['UCsN32BtMd0IoByjJRNF12cw' # 60 Minutes
]
youtube = build('youtube','v3',developerKey = api_key)
from googleapiclient.errors import HttpError
def get_channel_stats(youtube, sixty_channel_id):
all_data = []
try:
request = youtube.channels().list(
part='snippet,contentDetails,statistics',
id=','.join(sixty_channel_id)
)
response = request.execute()
for item in response.get('items', []):
snippet = item.get('snippet', {})
statistics = item.get('statistics', {})
data = {
'Channel_name': snippet.get('title', ''),
'Subscribers': statistics.get('subscriberCount', ''),
'Views': statistics.get('viewCount', ''),
'Total_videos': statistics.get('videoCount', '')
}
all_data.append(data)
except HttpError as e:
print(f"HTTP error occurred: {e}")
print(f"Request URL: {e.resp.request.url}")
print(f"Request body: {e.resp.request.body}")
return all_data
get_channel_stats(youtube,sixty_channel_id)
[{'Channel_name': '60 Minutes', 'Subscribers': '2660000', 'Views': '742789912', 'Total_videos': '3193'}]
channel_statistics = get_channel_stats(youtube, sixty_channel_id)
sixty_channel_data =pd.DataFrame(channel_statistics)
sixty_channel_data
Channel_name | Subscribers | Views | Total_videos | |
---|---|---|---|---|
0 | 60 Minutes | 2660000 | 742789912 | 3193 |
# Function to get channel statistics
api_key = 'AIzaSyB24Kop04L1GlTgRCm1XtQ4KB2a4gaBOwA'
VICE_channel_id = ['UCn8zNIfYAQNdrFRrr8oibKw' # VICE
]
youtube = build('youtube','v3',developerKey = api_key)
from googleapiclient.errors import HttpError
def get_channel_stats(youtube, VICE_channel_id):
all_data = []
try:
request = youtube.channels().list(
part='snippet,contentDetails,statistics',
id=','.join(VICE_channel_id)
)
response = request.execute()
for item in response.get('items', []):
snippet = item.get('snippet', {})
statistics = item.get('statistics', {})
data = {
'Channel_name': snippet.get('title', ''),
'Subscribers': statistics.get('subscriberCount', ''),
'Views': statistics.get('viewCount', ''),
'Total_videos': statistics.get('videoCount', '')
}
all_data.append(data)
except HttpError as e:
print(f"HTTP error occurred: {e}")
print(f"Request URL: {e.resp.request.url}")
print(f"Request body: {e.resp.request.body}")
return all_data
get_channel_stats(youtube, VICE_channel_id)
[{'Channel_name': 'VICE', 'Subscribers': '17900000', 'Views': '4942326231', 'Total_videos': '4029'}]
channel_statistics = get_channel_stats(youtube,VICE_channel_id)
VICE_channel_data =pd.DataFrame(channel_statistics)
VICE_channel_data
Channel_name | Subscribers | Views | Total_videos | |
---|---|---|---|---|
0 | VICE | 17900000 | 4942326231 | 4029 |
# Lets combine the data frames
# Combine DataFrames using concat
combined_documentaries_channels_df = pd.concat([Timeline_channel_data ,
DW_Documentary_channel_data ,
Free_Documentary_channel_data ,
Journeyman_Pictures_channel_data ,
sixty_channel_data,
VICE_channel_data
], ignore_index=True)
# Display the result
print(combined_documentaries_channels_df)
Channel_name Subscribers Views Total_videos 0 Timeline - World History Documentaries 5120000 1173285359 1235 1 DW Documentary 5390000 788340346 1071 2 jpmorgan 102000 41976005 970 3 Journeyman Pictures 2350000 881489991 8713 4 60 Minutes 2660000 742789912 3193 5 VICE 17900000 4942326231 4029
# # lets have a look at the datatypes
combined_documentaries_channels_df.info()
<class 'pandas.core.frame.DataFrame'> RangeIndex: 6 entries, 0 to 5 Data columns (total 4 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 Channel_name 6 non-null object 1 Subscribers 6 non-null object 2 Views 6 non-null object 3 Total_videos 6 non-null object dtypes: object(4) memory usage: 324.0+ bytes
# lets change the datatypes to perform visualisations
combined_documentaries_channels_df['Subscribers'] = pd.to_numeric(combined_documentaries_channels_df['Subscribers'])
combined_documentaries_channels_df['Views'] = pd.to_numeric(combined_documentaries_channels_df['Views'])
combined_documentaries_channels_df['Total_videos'] = pd.to_numeric(combined_documentaries_channels_df['Total_videos'])
# letsconirm if the datatypes has changed
combined_documentaries_channels_df.info()
<class 'pandas.core.frame.DataFrame'> RangeIndex: 6 entries, 0 to 5 Data columns (total 4 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 Channel_name 6 non-null object 1 Subscribers 6 non-null int64 2 Views 6 non-null int64 3 Total_videos 6 non-null int64 dtypes: int64(3), object(1) memory usage: 324.0+ bytes
combined_documentaries_channels_df
Channel_name | Subscribers | Views | Total_videos | |
---|---|---|---|---|
0 | Timeline - World History Documentaries | 5120000 | 1173285359 | 1235 |
1 | DW Documentary | 5390000 | 788340346 | 1071 |
2 | jpmorgan | 102000 | 41976005 | 970 |
3 | Journeyman Pictures | 2350000 | 881489991 | 8713 |
4 | 60 Minutes | 2660000 | 742789912 | 3193 |
5 | VICE | 17900000 | 4942326231 | 4029 |
import pandas as pd
import matplotlib.pyplot as plt
# Sort the DataFrame by 'Subscribers' in descending order
combined_documentaries_channels_df_subscribers_sorted = combined_documentaries_channels_df.sort_values(by='Subscribers', ascending=False)
# Shorten channel names
combined_documentaries_channels_df_subscribers_sorted['Channel_name'] =combined_documentaries_channels_df_subscribers_sorted['Channel_name'].apply(lambda x: x[:15])
# Plotting Subscribers in descending order
fig, axes = plt.subplots(nrows=3, ncols=1, figsize=(10, 15))
axes[0].bar(combined_documentaries_channels_df_subscribers_sorted['Channel_name'], combined_documentaries_channels_df_subscribers_sorted['Subscribers'], color='blue')
axes[0].set_title('Subscribers')
# Sort the DataFrame by 'Views' in descending order
combined_documentaries_channels_df_views_sorted = combined_documentaries_channels_df.sort_values(by='Views', ascending=False)
# Shorten channel names
combined_documentaries_channels_df_views_sorted['Channel_name'] = combined_documentaries_channels_df_views_sorted['Channel_name'].apply(lambda x: x[:15])
# Plotting Views in descending order
axes[1].bar(combined_documentaries_channels_df_views_sorted['Channel_name'],combined_documentaries_channels_df_views_sorted['Views'], color='brown')
axes[1].set_title('Views')
# Sort the DataFrame by 'Total_videos' in descending order
combined_documentaries_channels_df_total_videos_sorted =combined_documentaries_channels_df.sort_values(by='Total_videos', ascending=False)
# Shorten channel names
combined_documentaries_channels_df_total_videos_sorted['Channel_name'] = combined_documentaries_channels_df_total_videos_sorted['Channel_name'].apply(lambda x: x[:15])
# Plotting Total Videos in descending order
axes[2].bar(combined_documentaries_channels_df_total_videos_sorted['Channel_name'], combined_documentaries_channels_df_total_videos_sorted['Total_videos'], color='orange')
axes[2].set_title('Total Videos')
# Adjust layout for better visibility
plt.tight_layout()
# Show the plot
plt.show()